#!/usr/bin/python
# -*- coding: utf-8 -*-

"""urls config"""

import sys

from route.door import (GetIp,SetIp,SelectCard,CardUser,CardUsers,CardStatus,SetCallBackIp,CardDeleteAll,CardPower,OpenDoor)
reload(sys)
sys.setdefaultencoding('utf-8')

URLS = [
    (r'/api/getip/([\w]*)', GetIp),   #获取门禁ip地址
    (r'/api/setip/([\w]*)', SetIp),   #设置门禁ip地址
    (r"/api/selectcard/([\w]*)", SelectCard),  #获取最后刷卡了id号
    (r"/api/door/user", CardUser),#卡号用户对象
    (r"/api/door/user/([\w]*)", CardUser),#卡号用户对象
    (r"/api/door/users", CardUsers),#查询所有卡号用户
    (r"/api/door/status", CardStatus),#获取读卡器状态
    (r"/api/door/setcallbackip", SetCallBackIp),#获取读卡器状态
    (r"/api/door/users/powers", CardDeleteAll),#删除所有卡
    (r"/api/door/powers/([\w]*)", CardPower),#查看权限
    (r"/api/door/open", OpenDoor),
]


def get_urls():
    return URLS
